//
//  NSObject+JPF.h
//  JPFCore
//
//  Created by JPFei on 2019/3/14.
//  Copyright © 2019 nmo. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSObject (JPF)

@property (nonatomic, strong, readwrite) id extValue;

#pragma mark - 数据判断
//数据是否为空： nil，数组[]，字符串""，字典{}，NSData长度0
+ (BOOL)isEmpty:(id)obj;


- (id)nocaseKeyValue:(NSString *)path;
- (id)nocaseKeyValue:(NSString *)path defaultValue:(id)v;
- (NSString*)strValue:(NSString*)path;
- (NSString *)nocaseStrValue:(NSString *)path;
- (NSInteger)intValue:(NSString*)path;
- (NSInteger)intValue:(NSString*)path defaultValue:(NSInteger)defValue;

- (BOOL)nocaseBoolValue:(NSString*)path;
- (BOOL)nocaseBoolValue:(NSString*)path defaultValue:(BOOL)defValue;

- (NSArray *)nocaseArrValue:(NSString*)path;
- (NSArray *)nocaseArrValue:(NSString*)path defaultValue:(id)v;


//时间，毫秒输入
- (NSTimeInterval)nocaseTimeIntervalMilliseconds:(NSString*)path;
//时间，秒输入
- (NSTimeInterval)nocaseTimeIntervalSeconds:(NSString*)path;

- (NSString *)toJSONString;

@end

NS_ASSUME_NONNULL_END
